package leesoft.configuration.core;

public class TextConvert {
	public   static   String   charConvert(String strSource,String codePage){
		if(codePage.equalsIgnoreCase("utf-8"))
			return strSource;
		if(strSource==null)
			return "";
		else{
			try{
				byte[] b = strSource.getBytes("8859_1"); //中间用ISO-8859-1过渡
				String str = new String(b, "GB2312"); //转换成GB2312字符
				return str;
			}catch(Exception e){
				e.printStackTrace();
				return "";
			}
		}
    
    } 
}
